from PyQt4 import QtCore

class Plugin(object):
    
    keyword = []
    mime_type = "TEXT/PLAIN"
    
    def get_keyword(self):
        return self.keyword
    
    def set_keyword(self, keyword):
        self.keyword = keyword

    def _check(self, config):
        if self.check(config):
            return self.keyword
            
    def check(self, config):
        return False
    
    def get_file(self, config):
        return None
    
    def get_doc_name(self, config):
        return config["docname"]    
       
    def set_mime_type(self, type):
        self.mime_type = type
    
    def get_mime_type(self):
        return self.mime_type
    
    def get_documentation_path(self):
        settings = QtCore.QSettings()
        return str(settings.value("docs_path", QtCore.QVariant(QtCore.QString("/usr/share/doc"))).toString())        